# 基础镜像
FROM jueyi/centos-jdk8:latest
# 作者信息
MAINTAINER jueyi
# 设置时区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
# 拷贝jar 把可执行jar包复制到基础镜像的根目录下
COPY sample1.jar /usr/local
# 设置暴露的端口号
EXPOSE 8081 8081
# 在镜像运行为容器后执行的命令
ENTRYPOINT ["java","-jar","/usr/local/sample1.jar","-XX:+UnlockExperimentalVMOptions","XX:+UseCGroupMemoryLimitForHeap"]
